
<%@ page import="com.portico.dept.solarch.ProjectDashboard" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'projectDashboard.label', default: 'ProjectDashboard')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
      <resource:lightBox />

    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
            %{--<span class="menuButton"><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></span>--}%
        </div>
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>

                          <g:sortableColumn property="project.name"  title="${message(code: 'projectDashboard.project.name.label', default: 'Project Name')}" />

                            %{--<g:sortableColumn property="id" title="${message(code: 'projectDashboard.id.label', default: 'Id')}" />--}%

                            <g:sortableColumn property="overallStatus" title="${message(code: 'projectDashboard.overallStatus.label', default: 'Overall Status')}" />

                            <g:sortableColumn property="budget" title="${message(code: 'projectDashboard.budget.label', default: 'Budget')}" />

                            <g:sortableColumn property="resources" title="${message(code: 'projectDashboard.resources.label', default: 'Resources')}" />

                            <g:sortableColumn property="timeline" title="${message(code: 'projectDashboard.timeline.label', default: 'Timeline')}" />

                            <g:sortableColumn property="quality" title="${message(code: 'projectDashboard.quality.label', default: 'Quality')}" />

                            <td> Links </td>


                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${projectDashboardInstanceList}" status="i" var="projectDashboardInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

                            <td><g:link action="show" id="${projectDashboardInstance.id}">${fieldValue(bean: projectDashboardInstance.project, field: "name")}</g:link></td>

                            <td>${fieldValue(bean: projectDashboardInstance, field: "overallStatus")}</td>

                            <td>${fieldValue(bean: projectDashboardInstance, field: "budget")}</td>

                            <td>${fieldValue(bean: projectDashboardInstance, field: "resources")}</td>

                            <td>${fieldValue(bean: projectDashboardInstance, field: "timeline")}</td>

                            <td>${fieldValue(bean: projectDashboardInstance, field: "quality")}</td>

                          <td>

                            <richui:lightBox href="<%= link (action:'projectQualityTrend', params:['project.id':projectDashboardInstance.project.id, issueType:'ALL' ]) %>">All Issues Trend</richui:lightBox> </td>

                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            %{--<div class="paginateButtons">--}%
                %{--<g:paginate total="${projectDashboardInstanceTotal}" />--}%
            %{--</div>--}%
        </div>
    </body>
</html>
